<!--{if !$_G['gp_inajax']}-->
<!--{subtemplate shop/sub/header}-->
<!--{subtemplate shop/sub/navigation_left}-->
<div class="row" id="contents">
    <div class="main_left_2">
    <!--{if ($param)}-->
    	<!--{subtemplate shop/sub/param_menu}-->
    <!--{/if}-->
    	<!--{subtemplate shop/sub/ads_2}-->
        <!--{subtemplate shop/sub/ads_float}-->
    </div>
    <div id="listproduct_display" class="main_right_2">
<!--{else}-->
    <!--{template common/header_ajax}-->
<!--{/if}-->
    <!--{if ($have > 0)}-->
        <div class="switch_bar">
        	<div class="left_display">
            	<span><!--{lang ban_dang_xem}--></span>
                <a href="<!--{$vUrl}-->&amp;sort=last"<!--{if ($sort == 'last')} class="active"{/if}-->><!--{lang moi_cap_nhat}--></a>
                <a href="<!--{$vUrl}-->&amp;sort=pasc"<!--{if ($sort == 'pasc')} class="active"{/if}-->><!--{lang gia_thap_nhat}--></a>
                <a href="<!--{$vUrl}-->&amp;sort=pdesc"<!--{if ($sort == 'pdesc')} active{/if}-->"><!--{lang gia_cao_nhat}--></a>
                <a href="<!--{$vUrl}-->&amp;sort=sale" class="noborder<!--{if ($sort == 'sale')} active{/if}-->"><!--{lang giam_gia_nhat}--></a>
            </div>
            <div class="buttons">
                <div id="page_break" class="multi_page"><!--{$pages}--></div>
                <div class="view_display">
                    <a href="<!--{$sUrl}-->&amp;view=grid" class="btn_dis_col<!--{if ($view == 'grid')} active{/if}-->"></a>
                    <a href="<!--{$sUrl}-->&amp;view=list" class="btn_dis_row<!--{if ($view == 'list')} active{/if}-->"></a>
                </div>
                <div class="clear"></div>
            </div>
            <div class="clear"></div>
        </div>
	<!--{else}-->
        <div class="warning"><!--{lang danh_muc_khong_co_san_pham}--></div>
	<!--{/if}-->
        <div class="row">
        <!--{if ($view == 'grid')}-->
            <script type="text/javascript" reload="1">
            jQuery(document).ready(function() {
                // Find all images in the div with css .area_img
                var img = jQuery('.area_img').find('img');
                // image draggable up/down
                img.draggable({axis: "y"});
            });
            </script>
            <!--{eval $i=0;}-->
            <!--{loop $result $key $value}-->
            <!--{eval $i++;}-->
            <div class="products <!--{if ($i%2 == 1)}-->xLeft<!--{else}-->xRight<!--{/if}-->" id="pro_$value['pid']">
                <div class="topinfo">
                    <!--{if ($value['sales_status'])}-->
                    <div class="sale"><span>-<!--{$value['sales']}-->%</span></div>
                    <!--{/if}-->
                    <!--{if $value['new']==1}<div class="isnew">New</div>{/if}-->
                    <div class="place"><span><!--{if $value['province']}$value['province']{else}{lang toan_quoc}{/if}--></span></div>
                    <div class="area_img">
                        <img src="$value['imgcoverthumbbig']" width="335" height="335" alt="<!--{$value['pname']}-->" />
                    </div>
                    <div class="clear"></div>
                </div>
                <div class="clear"></div>
                <div class="bottominfo">
                    <p class="rateproduct"><span class="rating-static rating-$value['point']"></span><!--{if ($value['point'] > 5)}($value['total_vote']/$value['vote']){/if}--></p>
                    <div class="clear"></div>
                    <p class="title"><!--{eval echo truncate($value['pname'], 35)}--></p>
                    <div class="box tooltip">
                        <div class="price<!--{if ($value['save_money'] == 0)} lineheight{/if}-->">
                            <!--{$value[pprice]}-->
                            <!--{if ($value['save_money'] > 0)}-->
                            <br /><small><!--{lang tiet_kiem}-->$value['save_money']</small>
                            <!--{else}&nbsp;{/if}-->
                        </div>
                        <div class="detail lineheight">
                            <a href="shop.php?mod=view&amp;name=<!--{eval echo locdau($value['pname']);}-->&amp;pid=<!--{$value['pid']}-->"><!--{lang chi_tiet_sp}--></a>
                        </div>
                        <ul>
                            <li>
                                <h5><small><!--{$value['pname']}--></small></h5>
                                <div class="clear"></div>
                            </li>
                            <li>
                                <h5><!--{lang gia_ban}{$value['end_price']}--></h5>
                                <div class="clear"></div>
                            </li>
                        <!--{if ($value[summary]) != ''}-->
                            <li class="sep"><!--{$value['summary']}--></li>
                        <!--{/if}-->
                            <li class="sep"><!--{lang ngay_cap_nhat}{date($value[lastupdate], 'u', 9999, $_G[setting][dateformat])} --- {lang luot_xem}$value[hits]{if ($value[status] != 1)} --- {lang het_hang}{/if}--></li>
                        </ul>
                    </div>
                </div>
            </div>
            <!--{if ($i%2 == 0)}--><div class="clear"></div><!--{/if}-->
            <!--{/loop}-->
        <!--{else}-->
        	<!--{eval $i=0;}-->
			<!--{loop $result $key $value}-->
            <!--{eval $i++;}-->
            <div id="$i" class="div-table">
                <!--{if ($value['sales_status'])}-->
                <div class="sale"><span>-<!--{$value['sales']}-->%</span></div>
                <!--{/if}-->
                <div class="div-table-row">
                	<div class="div-table-col width_140"><img src="$value['imgcoverthumb']" width="140" height="140" alt="<!--{$value['pname']}-->" /></div>
                    <div class="div-table-col width_400">
                    	<p class="rateproduct"><span class="rating-static rating-$value['point']"></span><!--{if ($value['point'] > 5)}($value['total_vote']/$value['vote']){/if}--></p>
                    	<div class="clear"></div>
                        <h5><!--{$value['pname']}--></h5>
                        <p><!--{$value['summary']}--></p>
                    </div>
                    <div class="div-table-col width_140 bl">
                    	<ul class="pad pad_2">
                        	<!--<li><a href="#buy_now" class="zocial buy"><span>{lang mua_ngay}</span></a></li>-->
                            <li class="price">
                            <!--{if ($value['save_money'] > 0)}-->
                            	<u><!--{$value['behind_tax']}--></u>
                                <br /><em>(-<!--{$value['save_money']}-->)</em>
                            <!--{else}-->
                            	<u><!--{$value['behind_tax']}--></u>
                            <!--{/if}-->
                            </li>
                            <li><a href="shop.php?mod=view&amp;name=<!--{eval echo locdau($value['pname']);}-->&amp;pid=<!--{$value['pid']}-->" class="zocial buy"><span>{lang chi_tiet}</span></a></li>
                        </ul>
                    </div>
                </div>
                <div class="clear"></div>
            </div>   
            <div class="more_table">
                <ul class="pad">
                    <li class="shortinfo">
                        <p id="update"><!--{date($value['lastupdate'], 'u', 9999, $_G['setting']['dateformat'])}--></p>
                        <p id="view"><!--{lang luot_xem}{$value['hits']}--></p>
                        <p id="status">
                        {if $value['status'] == 0}
                            {lang het_hang}
                        {elseif $value['status'] == 1}
                            {lang san_trong_kho}
                        {elseif $value['status'] == 2}
                            {lang hang_dang_ve}
                        {elseif $value['status'] == 3}
                            {lang dang_dat_hang}
                        {/if}
                        </p>
                    </li>
                </ul>
                <div class="more_info">
                	<ul>
                    	<li class="ship"><!--{$value['delivery_price']}--></li>
                        <li class="store">
                        	<a href="home.php?mod=space&username=$value['username']&do=shopping" title="$value['shopname']"><!--{$value['shopname']}--></a>
                            <small class="red"><!--{if $value['verificationed']}{lang da_xac_thuc}{else}{lang chua_xac_thuc}{/if}--></small>
                        </li>
                        <li class="location"><!--{if $value['province']}$value['province']{else}{lang toan_quoc}{/if}--></li>
                    </ul>
                </div>
                <div class="number"><p><!--{$value['number']}--><span><!--{lang danh_gia}--></span></p></div>
                <div class="clear"></div>
                <p class="sep"><!--{lang ban_tai}{$value['shopaddr']}--></p>
            </div>
            <!--{/loop}-->
        <!--{/if}-->
            <div class="clear"></div>
        </div>
	<!--{if ($have > 0)}-->
        <div class="switch_bar">
        	<div class="left_display">
            	<span><!--{lang ban_dang_xem_danh_muc}--></span><a>{$_G['shop']['name']}</a>
            </div>
            <div class="buttons">
                <div id="page_break_2" class="multi_page"><!--{$pages}--></div>
                <div class="view_display">
                    <a href="<!--{$sUrl}-->&amp;view=grid" class="btn_dis_col<!--{if ($view == 'grid')} active{/if}-->"></a>
                    <a href="<!--{$sUrl}-->&amp;view=list" class="btn_dis_row<!--{if ($view == 'list')} active{/if}-->"></a>
                </div>
                <div class="clear"></div>
            </div>
            <div class="clear"></div>
        </div>
	<!--{/if}-->
<!--{if !$_G['gp_inajax']}-->
    </div>
    <div class="clear"></div>
</div>
<script type="text/javascript">ajaxupdateevents($('page_break'));ajaxupdateevents($('page_break_2'));</script>
<!--{subtemplate shop/sub/footer}-->
<!--{else}-->
	<!--{template common/footer_ajax}-->
<!--{/if}-->